<!DOCTYPE html>
<html>
<head hexo-theme='https://volantis.js.org/#1.6.3'>
  <meta charset="utf-8">
  <!-- SEO相关 -->
  
    
      <meta name="robots" content="noindex,follow">
    
  
  <!-- 渲染优化 -->
  <meta name="renderer" content="webkit">
  <meta name="force-rendering" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="HandheldFriendly" content="True" >
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  <!-- 页面元数据 -->
  
    <title>Archive: 2020/3 - yangbin1215</title>
  
  

  <!-- feed -->
  

  <!-- import meta -->
  

  <!-- link -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.12.1/css/all.min.css">
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css">

  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">

  

  

  
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.css">
  

  <!-- import link -->
  

  
    
<link rel="stylesheet" href="/style.css">

  

  <script>
    function setLoadingBarProgress(num) {
      document.getElementById('loading-bar').style.width=num+"%";
    }
  </script>

  
  
</head>

<body>
  
  <div class="cover-wrapper">
    <cover class='cover  half'>
      
        
  <p class="title ">YangBin1215</p>
  
    <p class="subtitle ">朱 雀 桥 边 野 草 花</p>
  


  <div class="m_search">
    <form name="searchform" class="form u-search-form">
      <i class="icon fas fa-search fa-fw"></i>
      <input type="text" class="input u-search-input" placeholder="搜索文档" />
    </form>
  </div>

<div class='menu navigation'>
  <ul class='h-list'>
    
      
        <li>
          <a class="nav home "
            href="/"
            
            
            id="home">
            <i class='fas fa-bullhorn fa-fw'></i>&nbsp;主页
          </a>
        </li>
      
        <li>
          <a class="nav home "
            href="/archives/"
            
            
            id="archives">
            <i class='fas fa-book fa-fw'></i>&nbsp;归档
          </a>
        </li>
      
        <li>
          <a class="nav home "
            href="/about/"
            
            
            id="about">
            <i class='fas fa-id-card fa-fw'></i>&nbsp;关于我
          </a>
        </li>
      
        <li>
          <a class="nav home "
            href="https://github.com/yangbin1215/"
            
            
              target="_blank"
            
            id="https:github.comyangbin1215">
            <i class='fas fa-link fa-fw'></i>&nbsp;Github
          </a>
        </li>
      
        <li>
          <a class="nav home "
            href="https://gitee.com/yangbin1215/"
            
            
              target="_blank"
            
            id="https:gitee.comyangbin1215">
            <i class='fas fa-space-shuttle fa-fw'></i>&nbsp;Gitee
          </a>
        </li>
      
    
  </ul>
</div>

      
    </cover>
    <header class="l_header nav-blur">
  <div id="loading-bar-wrapper">
    <div id="loading-bar"></div>
  </div>
	<div class='wrapper'>
		<div class="nav-main container container--flex">
      
        <a class="logo flat-box" target="_self" href='/' >
          
            
              
                <i class='assets/frog.png'></i>
              
              
                yangbin1215
              
            
          
        </a>
      

			<div class='menu navigation'>
				<ul class='h-list'>
          
  					
  						<li>
								<a class="nav flat-box" href="/getting-started/"
                  
                  
                  id="getting-started">
									<i class='fas fa-flag fa-fw'></i>&nbsp;开始
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/site-settings/"
                  
                  
                  id="site-settings">
									<i class='fas fa-globe-asia fa-fw'></i>&nbsp;站点
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/theme-settings/"
                  
                  
                  id="theme-settings">
									<i class='fas fa-palette fa-fw'></i>&nbsp;主题
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/page-settings/"
                  
                  
                  id="page-settings">
									<i class='fas fa-file-alt fa-fw'></i>&nbsp;页面
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/tag-plugins/"
                  
                  
                  id="tag-plugins">
									<i class='fas fa-pen-alt fa-fw'></i>&nbsp;书写
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/advanced-settings/"
                  
                  
                  id="advanced-settings">
									<i class='fas fa-flask fa-fw'></i>&nbsp;进阶
								</a>
							</li>
      			
      		
				</ul>
			</div>

      <div class="m_search">
        <form name="searchform" class="form u-search-form">
          <i class="icon fas fa-search fa-fw"></i>
          <input type="text" class="input u-search-input" placeholder="搜索文档" />
        </form>
      </div>

			<ul class='switcher h-list'>
				
					<li class='s-search'><a class="fas fa-search fa-fw" target="_self" href='javascript:void(0)'></a></li>
				
				<li class='s-menu'><a class="fas fa-bars fa-fw" target="_self" href='javascript:void(0)'></a></li>
			</ul>
		</div>

		<div class='nav-sub container container--flex'>
			<a class="logo flat-box"></a>
			<ul class='switcher h-list'>
				<li class='s-comment'><a class="flat-btn fas fa-comments fa-fw" target="_self" href='javascript:void(0)'></a></li>
        
          <li class='s-toc'><a class="flat-btn fas fa-list fa-fw" target="_self" href='javascript:void(0)'></a></li>
        
			</ul>
		</div>
	</div>
</header>
	<aside class="menu-phone white-box">
    <header>
		<nav class="menu navigation">
      <ul>
        
          
            <li>
							<a class="nav flat-box" href="/getting-started/"
                
                
                id="getting-started">
								<i class='fas fa-flag fa-fw'></i>&nbsp;开始
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/site-settings/"
                
                
                id="site-settings">
								<i class='fas fa-globe-asia fa-fw'></i>&nbsp;站点
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/theme-settings/"
                
                
                id="theme-settings">
								<i class='fas fa-palette fa-fw'></i>&nbsp;主题
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/page-settings/"
                
                
                id="page-settings">
								<i class='fas fa-file-alt fa-fw'></i>&nbsp;页面
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/tag-plugins/"
                
                
                id="tag-plugins">
								<i class='fas fa-pen-alt fa-fw'></i>&nbsp;书写
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/advanced-settings/"
                
                
                id="advanced-settings">
								<i class='fas fa-flask fa-fw'></i>&nbsp;进阶
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/faqs/"
                
                
                id="faqs">
								<i class='fas fa-question-circle fa-fw'></i>&nbsp;帮助
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/contributors/"
                
                
                id="contributors">
								<i class='fas fa-handshake fa-fw'></i>&nbsp;鸣谢
							</a>
            </li>
          
       
      </ul>
		</nav>
    </header>
	</aside>
<script>setLoadingBarProgress(40);</script>

  </div>


  <div class="l_body">
    <div class='body-wrapper'>
      

<div class='l_main'>
	
		
  <section class="post-list ">
    
      
        
          
        
          
        
      
    
    
      
        
          <div class='post-wrapper'>
            <article class="post white-box   reveal ">
  


  <section class='meta'>
    
    
    <div class="meta" id="header-meta">
      
        
  <h2 class="title">
    <a href="/2020/03/02/MyBatis%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">
      MyBatis缓存
    </a>
  </h2>


      
      <div class='new-meta-box'>
        
          
        
          
            
<div class='new-meta-item author'>
  <a href="" rel="nofollow">
    <img src="assets/avatar.jpg">
    <p>yang bin</p>
  </a>
</div>

          
        
          
            <div class="new-meta-item date">
  <a class='notlink'>
    <i class="fas fa-edit" aria-hidden="true"></i>
    <p>发布于：Mar 2, 2020</p>
  </a>
</div>

          
        
          
            <div class="new-meta-item date" itemprop="dateUpdated" datetime="2020-03-02T15:19:27+08:00">
  <a class='notlink'>
    <i class="fas fa-save" aria-hidden="true"></i>
    <p>更新于：Mar 2, 2020</p>
  </a>
</div>

          
        
          
            

          
        
      </div>
      
        <hr>
      
    </div>
  </section>


  <section class="article typo">
    <div class="article-entry" itemprop="articleBody">
      <h2 id="MyBatis-缓存"><a href="#MyBatis-缓存" class="headerlink" title="MyBatis 缓存"></a>MyBatis 缓存</h2><ul>
<li><h3 id="什么是MyBatis缓存"><a href="#什么是MyBatis缓存" class="headerlink" title="什么是MyBatis缓存"></a>什么是MyBatis缓存</h3></li>
</ul>
<p>使用缓存可以减少Java程序与数据库的交互次数，从而提升程序运行的效率。</p>
<p>第一次查询的结果会保存到缓存之中，当下一次查询时，直接从缓存中取出对象，无需访问数据库。</p>
<ul>
<li>MyBatis缓存分类</li>
</ul>
<h3 id="1、一级缓存：SqlSession级别，默认开启，并且不能关闭。"><a href="#1、一级缓存：SqlSession级别，默认开启，并且不能关闭。" class="headerlink" title="1、一级缓存：SqlSession级别，默认开启，并且不能关闭。"></a>1、一级缓存：SqlSession级别，默认开启，并且不能关闭。</h3>
      
        
          <div class="button readmore">
            <a href="/2020/03/02/MyBatis%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" class="flat-box">
              <i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
              Read More
            </a>
          </div>
        
      
    </div>
    <!-- 
      <div class="full-width auto-padding tags">
        
          <a href="/tags/Mybatis/" rel="nofollow"><i class="fas fa-tag fa-fw"></i> Mybatis</a>
        
      </div>
     -->
  </section>
</article>

          </div>
        
      
        
          <div class='post-wrapper'>
            <article class="post white-box   reveal ">
  


  <section class='meta'>
    
    
    <div class="meta" id="header-meta">
      
        
  <h2 class="title">
    <a href="/2020/03/01/hello-world/">
      Hello World
    </a>
  </h2>


      
      <div class='new-meta-box'>
        
          
        
          
            
<div class='new-meta-item author'>
  <a href="" rel="nofollow">
    <img src="assets/avatar.jpg">
    <p>yang bin</p>
  </a>
</div>

          
        
          
            <div class="new-meta-item date">
  <a class='notlink'>
    <i class="fas fa-edit" aria-hidden="true"></i>
    <p>发布于：Mar 1, 2020</p>
  </a>
</div>

          
        
          
            <div class="new-meta-item date" itemprop="dateUpdated" datetime="2020-03-02T14:08:04+08:00">
  <a class='notlink'>
    <i class="fas fa-save" aria-hidden="true"></i>
    <p>更新于：Mar 2, 2020</p>
  </a>
</div>

          
        
          
            

          
        
      </div>
      
        <hr>
      
    </div>
  </section>


  <section class="article typo">
    <div class="article-entry" itemprop="articleBody">
      <p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3>
      
        
          <div class="button readmore">
            <a href="/2020/03/01/hello-world/" class="flat-box">
              <i class="fas fa-book-open fa-fw" aria-hidden="true"></i>
              Read More
            </a>
          </div>
        
      
    </div>
    <!--  -->
  </section>
</article>

          </div>
        
      
    
  </section>
  
    
    <!-- 根据主题中的设置决定是否在archive中针对摘要部分的MathJax公式加载mathjax.js文件 -->
    
    

  


	
</div>
<aside class='l_side'>
  
    
      
    
      
    
      
    
      
    
      
    
      
    
      
        

<section class="widget grid  widget-blur desktop mobile">
  
  <header>
    
      <i class="fas fa-tasks fa-fw" aria-hidden="true"></i><span class='name'>博客导航</span>
    
  </header>


  <div class='content'>
    <ul class="grid navigation">
      
        <li><a class="flat-box" title="/" href="/"
          
          
          id="home">
          
            <i class="fas fa-bullhorn fa-fw" aria-hidden="true"></i>
          
          主页
        </a></li>
      
        <li><a class="flat-box" title="/archives/" href="/archives/"
          
          
          id="archives">
          
            <i class="fas fa-book fa-fw" aria-hidden="true"></i>
          
          归档
        </a></li>
      
        <li><a class="flat-box" title="/about/" href="/about/"
          
          
          id="about">
          
            <i class="fas fa-id-card fa-fw" aria-hidden="true"></i>
          
          关于我
        </a></li>
      
        <li><a class="flat-box" title="https://github.com/yangbin1215/" href="https://github.com/yangbin1215/"
          
          
            target="_blank"
          
          id="https:github.comyangbin1215">
          
            <i class="fas fa-link fa-fw" aria-hidden="true"></i>
          
          Github
        </a></li>
      
        <li><a class="flat-box" title="https://gitee.com/yangbin1215/" href="https://gitee.com/yangbin1215/"
          
          
            target="_blank"
          
          id="https:gitee.comyangbin1215">
          
            <i class="fas fa-space-shuttle fa-fw" aria-hidden="true"></i>
          
          Gitee
        </a></li>
      
    </ul>
  </div>
</section>

      
    
  
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
  
    
      
    
      
    
      
    
      
    
      
    
      
    
      
    
  
</aside>

<footer class="clearfix ">
  <br><br>
  
    <div class="social-wrapper">
      
        
          <a href="/atom.xml"
            class="social fas fa-rss flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
        
          <a href="mailto:me@xaoxuu.com"
            class="social fas fa-envelope flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
        
          <a href="https://github.com/xaoxuu"
            class="social fab fa-github flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
        
          <a href="https://music.163.com/#/user/home?id=63035382"
            class="social fas fa-headphones-alt flat-btn"
            target="_blank"
            rel="external nofollow noopener noreferrer">
          </a>
        
      
    </div>
  
  
    <br>
    <div class="aplayer-container">
      

  
    <meting-js
      theme='#1BCDFC'
      autoplay='false'
      volume='0.7'
      loop='all'
      order='list'
      fixed='false'
      list-max-height='340px'
      server='netease'
      type='playlist'
      id='3175833810'
      list-folded='true'>
    </meting-js>
  


    </div>
  
  <br>
  <div><p>Blog content follows the <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en" target="_blank" rel="noopener">Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License</a></p>
</div>
  <div>
    Use
    <a href="https://volantis.js.org/" target="_blank" class="codename">Volantis</a>
    as theme
    
      , 
      total visits
      <span id="busuanzi_value_site_pv"><i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i></span>
      times
    
    . 
  </div>
  
</footer>
<script>setLoadingBarProgress(80);</script>




	<!-- 根据主题中的设置决定是否在archive中针对摘要部分的MathJax公式加载mathjax.js文件 -->
	

	


      <script>setLoadingBarProgress(60);</script>
    </div>
    <a class="s-top fas fa-arrow-up fa-fw" href='javascript:void(0)'></a>
  </div>
  
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>


  <script>
    
    var SEARCH_SERVICE = "hexo" || "hexo";
    var ROOT = "/" || "/";
    if (!ROOT.endsWith('/')) ROOT += '/';
  </script>


  <script async src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@1.6.3/js/instant_page.js" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>


  <script async src="https://cdn.jsdelivr.net/npm/aplayer@1.10/dist/APlayer.min.js"></script>
  <script async src="https://cdn.jsdelivr.net/npm/meting@2.0/dist/Meting.min.js"></script>



  
<script src="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.js" async></script>

  <script type="text/javascript">
    $(function() {
      Waves.attach('.flat-btn', ['waves-button']);
      Waves.attach('.float-btn', ['waves-button', 'waves-float']);
      Waves.attach('.float-btn-light', ['waves-button', 'waves-float', 'waves-light']);
      Waves.attach('.flat-box', ['waves-block']);
      Waves.attach('.float-box', ['waves-block', 'waves-float']);
      Waves.attach('.waves-image');
      Waves.init();
    });
  </script>


  <script async src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-busuanzi@2.3/js/busuanzi.pure.mini.js"></script>



  
  
  
    
<script src="//cdn.jsdelivr.net/npm/jquery-backstretch@2.1.18/jquery.backstretch.min.js"></script>

    <script type="text/javascript">
      $(function(){
        if ('') {
          $('').backstretch(
          ["https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/BBC19066-E176-47C2-9D22-48C81EE5DF6B.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/B18FCBB3-67FD-48CC-B4F3-457BA145F17A.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/00E0F0ED-9F1C-407A-9AA6-545649D919F4.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/67239FBB-E15D-4F4F-8EE8-0F1C9F3C4E7C.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/B951AE18-D431-417F-B3FE-A382403FF21B.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/AEB33F9D-7294-4CF1-B8C5-3020748A9D45.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/2884F904-F1F3-479E-AE27-5EBC291B63B0.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/10A0FCE5-36A1-4AD0-8CF0-019259A89E03.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/250662D4-5A21-4AAA-BB63-CD25CF97CFF1.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/298468D7-E388-44A8-8CC5-8213BDC33CED.jpeg"],
          {
            duration: "20000",
            fade: "2500"
          });
        } else {
          $.backstretch(
          ["https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/41F215B9-261F-48B4-80B5-4E86E165259E.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/BBC19066-E176-47C2-9D22-48C81EE5DF6B.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/B18FCBB3-67FD-48CC-B4F3-457BA145F17A.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/00E0F0ED-9F1C-407A-9AA6-545649D919F4.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/67239FBB-E15D-4F4F-8EE8-0F1C9F3C4E7C.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/B951AE18-D431-417F-B3FE-A382403FF21B.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/AEB33F9D-7294-4CF1-B8C5-3020748A9D45.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/abstract/2884F904-F1F3-479E-AE27-5EBC291B63B0.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/10A0FCE5-36A1-4AD0-8CF0-019259A89E03.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/250662D4-5A21-4AAA-BB63-CD25CF97CFF1.jpeg", "https://cdn.jsdelivr.net/gh/xaoxuu/cdn-wallpaper/landscape/298468D7-E388-44A8-8CC5-8213BDC33CED.jpeg"],
          {
            duration: "20000",
            fade: "2500"
          });
        }
      });
    </script>
  











  
<script src="/js/app.js"></script>



  
<script src="/js/search.js"></script>



  
<script src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-volantis@1.6.3/js/comment_typing.js"></script>



<!-- 复制 -->

  <script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
  let COPY_SUCCESS = "Copied";
  let COPY_FAILURE = "Copy failed";
  /*页面载入完成后，创建复制按钮*/
  !function (e, t, a) {
    /* code */
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '  <i class="fa fa-copy"></i><span>Copy</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });

      clipboard.on('success', function(e) {
        //您可以加入成功提示
        console.info('Action:', e.action);
        console.info('Text:', e.text);
        console.info('Trigger:', e.trigger);
        success_prompt(COPY_SUCCESS);
        e.clearSelection();
      });
      clipboard.on('error', function(e) {
        //您可以加入失败提示
        console.error('Action:', e.action);
        console.error('Trigger:', e.trigger);
        fail_prompt(COPY_FAILURE);
      });
    }
    initCopyCode();

  }(window, document);

  /**
   * 弹出式提示框，默认1.5秒自动消失
   * @param message 提示信息
   * @param style 提示样式，有alert-success、alert-danger、alert-warning、alert-info
   * @param time 消失时间
   */
  var prompt = function (message, style, time)
  {
      style = (style === undefined) ? 'alert-success' : style;
      time = (time === undefined) ? 1500 : time*1000;
      $('<div>')
          .appendTo('body')
          .addClass('alert ' + style)
          .html(message)
          .show()
          .delay(time)
          .fadeOut();
  };

  // 成功提示
  var success_prompt = function(message, time)
  {
      prompt(message, 'alert-success', time);
  };

  // 失败提示
  var fail_prompt = function(message, time)
  {
      prompt(message, 'alert-danger', time);
  };

  // 提醒
  var warning_prompt = function(message, time)
  {
      prompt(message, 'alert-warning', time);
  };

  // 信息提示
  var info_prompt = function(message, time)
  {
      prompt(message, 'alert-info', time);
  };

</script>




<!-- fancybox -->

  <script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script>
  let LAZY_LOAD_IMAGE = "";
  $(".article-entry").find("fancybox").find("img").each(function () {
      var element = document.createElement("a");
      $(element).attr("data-fancybox", "gallery");
      $(element).attr("href", $(this).attr("src"));
      /* 图片采用懒加载处理时,
       * 一般图片标签内会有个属性名来存放图片的真实地址，比如 data-original,
       * 那么此处将原本的属性名src替换为对应属性名data-original,
       * 修改如下
       */
       if (LAZY_LOAD_IMAGE) {
         $(element).attr("href", $(this).attr("data-original"));
       }
      $(this).wrap(element);
  });
</script>






  <script>setLoadingBarProgress(100);</script>
</body>
</html>
